<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// +----------------------------------------------------------------------
// | 缓存设置
// +----------------------------------------------------------------------

return [
    // 驱动方式
    'type'   => 'complex',
    //默认缓存
    'default' => [
        //驱动方式
        'type' => 'redis',
        //服务器地址
        'host' => env('REDIS_HOST', '127.0.0.1')
    ],
    'memcache' => [
        //驱动方式
        'type' => env('CACHE_TYPE', 'memcached'),
        //服务器地址
        'host' => env('MEMCACHE_HOST', '127.0.0.1')
    ],
    'file' => [
        //驱动方式
        'type' => 'file',
        // 缓存保存目录
        'path'   => '',
        // 缓存前缀
        'prefix' => '',
        // 缓存有效期 0表示永久缓存
        'expire' => 0,
    ],
    'redis' => [
        //驱动方式
        'type' => 'redis',
        //服务器地址
        'host' => env('REDIS_HOST', '127.0.0.1')
    ]
];
